package com.ruoyi.project.warehouse.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.warehouse.mapper.RyInventoryCurrentStockMapper;
import com.ruoyi.project.warehouse.domain.RyInventoryCurrentStock;
import com.ruoyi.project.warehouse.service.IRyInventoryCurrentStockService;

/**
 * 产品当前库存Service业务层处理
 *
 * @author you
 * @date 2022-09-07
 */
@Service
public class RyInventoryCurrentStockServiceImpl implements IRyInventoryCurrentStockService
{
    @Autowired
    private RyInventoryCurrentStockMapper ryInventoryCurrentStockMapper;

    /**
     * 查询产品当前库存
     *
     * @param id 产品当前库存主键
     * @return 产品当前库存
     */
    @Override
    public RyInventoryCurrentStock selectRyInventoryCurrentStockById(Long id)
    {
        return ryInventoryCurrentStockMapper.selectRyInventoryCurrentStockById(id);
    }

    /**
     * 查询产品当前库存列表
     *
     * @param ryInventoryCurrentStock 产品当前库存
     * @return 产品当前库存
     */
    @Override
    public List<RyInventoryCurrentStock> selectRyInventoryCurrentStockList(RyInventoryCurrentStock ryInventoryCurrentStock)
    {
        return ryInventoryCurrentStockMapper.selectRyInventoryCurrentStockList(ryInventoryCurrentStock);
    }

    /**
     * 新增产品当前库存
     *
     * @param ryInventoryCurrentStock 产品当前库存
     * @return 结果
     */
    @Override
    public int insertRyInventoryCurrentStock(RyInventoryCurrentStock ryInventoryCurrentStock)
    {
        return ryInventoryCurrentStockMapper.insertRyInventoryCurrentStock(ryInventoryCurrentStock);
    }

    /**
     * 修改产品当前库存
     *
     * @param ryInventoryCurrentStock 产品当前库存
     * @return 结果
     */
    @Override
    public int updateRyInventoryCurrentStock(RyInventoryCurrentStock ryInventoryCurrentStock)
    {
        return ryInventoryCurrentStockMapper.updateRyInventoryCurrentStock(ryInventoryCurrentStock);
    }

    /**
     * 批量删除产品当前库存
     *
     * @param ids 需要删除的产品当前库存主键
     * @return 结果
     */
    @Override
    public int deleteRyInventoryCurrentStockByIds(Long[] ids)
    {
        return ryInventoryCurrentStockMapper.deleteRyInventoryCurrentStockByIds(ids);
    }

    /**
     * 删除产品当前库存信息
     *
     * @param id 产品当前库存主键
     * @return 结果
     */
    @Override
    public int deleteRyInventoryCurrentStockById(Long id)
    {
        return ryInventoryCurrentStockMapper.deleteRyInventoryCurrentStockById(id);
    }
}
